//
//  XHSignUpAccountCell.m
//  elxc
//
//  Created by 冷山 on 16/3/15.
//  Copyright © 2016年 lexingsoft. All rights reserved.
//

#import "XHSignUpAccountCell.h"


@implementation XHSignUpAccountCell

- (void)awakeFromNib
{
    [self.ui_localBtn setImage:[UIImage imageNamed:@"shouye_icon_weixian"] forState:UIControlStateNormal];
    [self.ui_localBtn setImage:[UIImage imageNamed:@"shouye_icon_yixuan"] forState:UIControlStateSelected];
    [self.ui_localBtn addTarget:self action:@selector(selectAction:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.ui_nonlocalBtn setImage:[UIImage imageNamed:@"shouye_icon_weixian"] forState:UIControlStateNormal];
    [self.ui_nonlocalBtn setImage:[UIImage imageNamed:@"shouye_icon_yixuan"] forState:UIControlStateSelected];
    [self.ui_nonlocalBtn addTarget:self action:@selector(selectAction:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.ui_studentBtn setImage:[UIImage imageNamed:@"shouye_icon_weixian"] forState:UIControlStateNormal];
    [self.ui_studentBtn setImage:[UIImage imageNamed:@"shouye_icon_yixuan"] forState:UIControlStateSelected];
    [self.ui_studentBtn addTarget:self action:@selector(selectAction:) forControlEvents:UIControlEventTouchUpInside];

}

- (void)selectAction:(UIButton*)btn
{
    [self.ui_localBtn setSelected:NO];
    [self.ui_nonlocalBtn setSelected:NO];
    [self.ui_studentBtn setSelected:NO];
    
    [btn setSelected:YES];
    [_delegate accountSelectWithButton:btn];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
